package com.hades.example.java.refactoring.after.c11.c11_10_form_template_method;


public class TextStatement extends Statement {
    @Override
    String headerString(Customer customer) {
        return "Rental Record for " + customer.getName() + "\n";
    }

    @Override
    String eachRentalString(Rental each) {
        return "\t" + each.getMovie().getTitle() + "\t" + each.getCharge() + "\n";
    }

    @Override
    String footerString(Customer customer) {
        return "Amount owed is " + customer.getTotalCharge() + "\n"
                + "You earned " + customer.getTotalFrequentRenterPoints() +
                " frequent renter points";
    }
}
